﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="FluentFTP.View.EditServerView"
        Title="Edit Server Properties" ResizeMode="NoResize" WindowStyle="ToolWindow" Width="400" Height="230">
    <Grid>
    	<Grid.RowDefinitions>
    		<RowDefinition Height="40"/>
    		<RowDefinition Height="40"/>
    		<RowDefinition Height="40"/>
			<RowDefinition Height="40"/>
    		<RowDefinition Height="30"/>
    	</Grid.RowDefinitions>
    	<Grid.ColumnDefinitions>
    		<ColumnDefinition Width="100"/>
    		<ColumnDefinition Width="*"/>
    	</Grid.ColumnDefinitions>
    	<TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" Text="Server Name:" VerticalAlignment="Center" Margin="0,0,8,0"/>
    	<TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" Text="Adress:" VerticalAlignment="Center" Grid.Row="1" Margin="0,0,8,0"/>
    	<TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" Text="Username:" VerticalAlignment="Center" Grid.Row="2" Margin="0,0,8,0"/>
    	<TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" Text="Password:" VerticalAlignment="Center" Grid.Row="3" Margin="0,0,8,0"/>
    	<TextBox TextWrapping="Wrap" VerticalAlignment="Center" Grid.Column="1" Margin="8,0" Text="{Binding Server.Name, NotifyOnValidationError=True, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBox TextWrapping="Wrap" VerticalAlignment="Center" Grid.Row="1" Grid.Column="1" Margin="8,0" Text="{Binding Server.Adress, NotifyOnValidationError=True, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBox TextWrapping="Wrap" VerticalAlignment="Center" Grid.Row="2" Grid.Column="1" Margin="8,0"  Text="{Binding Server.UserName, NotifyOnValidationError=True, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBox TextWrapping="Wrap" VerticalAlignment="Center" Grid.Row="3" Grid.Column="1" Margin="8,0" Text="{Binding Server.Password, NotifyOnValidationError=True, UpdateSourceTrigger=PropertyChanged}"/>
    	<StackPanel Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right" Grid.Column="1">
    		<Button x:Name="CancelButton" Content="Cancel" Margin="0,0,8,0" IsCancel="True" Click="CancelButton_Click" />
            <Button x:Name="SaveButton" Content="Save" Margin="0,0,8,0" IsDefault="True" Command="{Binding Save}" Click="SaveButton_Click"  />
    	</StackPanel>
        
    </Grid>
</Window>
